#!/usr/bin/python

# -*- coding: iso-8859-1 -*-

from sqlalchemy import *

class ConnectionFactory:

    metadata = ''
    
    def __init__(self, path=None, debug=None):
        self.path = path
        self.debug = debug

    def openConnection(self):
        self.db = create_engine(self.path)
        self.db.echo = self.debug
        self.metadata = BoundMetaData(self.db)

    def openSession(self):
        return create_session()